/**
 * 
 */
package pers.xwx.titan.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import pers.xwx.titan.filter.DruidLogFilter;

/**
 * @author user
 *
 */
@Configuration
@PropertySource("classpath:druid-log-config.properties")
@ComponentScan({ "pers.xwx.titan" })
public class TitanDruidLogConfiguration {

	/**
	 * 数据库类型，默认mysql
	 */
	@Value("${titan.tools.druidlog.dbtype}")
	private String dbType = "mysql";

	/**
	 * 日志Bean
	 * 
	 * @return
	 */
	@Bean
	public DruidLogFilter druidLogFilter() {
		return new DruidLogFilter(dbType);
	}

}
